package com.zz.examination.repository.impl;

import com.zz.examination.entity.Question;
import com.zz.examination.repository.QuestionRepository;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class QuestionRepositoryImpl implements QuestionRepository {

    @Resource
    private MongoTemplate mongoTemplate;

    @Override
    public long count() {
        return mongoTemplate.count(null, Question.class);
    }
}
